package com.redare.dev.smart.generator.sdk.pojo;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * @author yangqy on 2021/9/18
 * @date 2021/9/18 上午11:53
 */
public class CodeGenForm {

    public static class CodeGen{

        @NotNull(message = "生成表单不能为空")
        private List<OnlFormHead> onlFormHeads;
        @NotEmpty(message = "选择模板不能为空")
        private List<String> groupIds;
        @NotNull(message = "生成路径不能为空")
        private Map<String, String> groupPathMap = new HashMap<>();

        public List<OnlFormHead> getOnlFormHeads() {
            return onlFormHeads;
        }

        public CodeGen setOnlFormHeads(List<OnlFormHead> onlFormHeads) {
            this.onlFormHeads = onlFormHeads;
            return this;
        }

        public List<String> getGroupIds() {
            return groupIds;
        }

        public CodeGen setGroupIds(List<String> groupIds) {
            this.groupIds = groupIds;
            return this;
        }

        public Map<String, String> getGroupPathMap() {
            return groupPathMap;
        }

        public CodeGen setGroupPathMap(Map<String, String> groupPathMap) {
            this.groupPathMap = groupPathMap;
            return this;
        }
    }

    public static class CodePreview{

        @NotNull(message = "预览表单不能为空")
        private OnlFormHead onlFormHead;
        @NotNull(message = "选择模板不能为空")
        private String templateId;

        public OnlFormHead getOnlFormHead() {
            return onlFormHead;
        }

        public CodePreview setOnlFormHead(OnlFormHead onlFormHead) {
            this.onlFormHead = onlFormHead;
            return this;
        }

        public String getTemplateId() {
            return templateId;
        }

        public CodePreview setTemplateId(String templateId) {
            this.templateId = templateId;
            return this;
        }
    }
}
